/*****************************************************************************
  Copyright ?2002-2004 by Martin Cook. All rights are reserved. If you like
  this code then feel free to go ahead and use it. The only thing I ask is 
  that you don't remove or alter my copyright notice. Your use of this 
  software is entirely at your own risk. I make no claims about the 
  reliability or fitness of this code for any particular purpose. If you 
  make changes or additions to this code then please clearly mark your code 
  as yours. If you have questions or comments then please contact me at: 
  martin@codegator.com
  
  Have Fun! :o)
*****************************************************************************/

using System;
using System.Configuration;

namespace CG.Security.Data.Configuration
{
	/// <summary>
	/// Represents the runtimeSetup section of a CG.Security.Data 
	/// configuration group.
	/// </summary>
	public sealed class DataSettings
	{

		// ******************************************************************
		// Attributes.
		// ******************************************************************

		#region Attributes

		/// <summary>
		/// Represents the section name.
		/// </summary>
		private string m_sectionName;

		/// <summary>
		/// Represents the name of the target .NET assembly.
		/// </summary>
		private string m_targetAssembly;

		/// <summary>
		/// Represents the target namespace.
		/// </summary>
		private string m_targetNamespace;

		/// <summary>
		/// Represents the connection string for the database.
		/// </summary>
		private string m_connectionString;

		#endregion

		// ******************************************************************
		// Properties.
		// ******************************************************************

		#region Properties

		/// <summary>
		/// Gets the section name.
		/// </summary>
		public string SectionName
		{
			get {return m_sectionName;}
		} // End SectionName

		// ******************************************************************

		/// <summary>
		/// Gets the name of the target .NET assembly.
		/// </summary>
		public string TargetAssembly
		{
			get {return m_targetAssembly;}
		} // End TargetAssembly

		// ******************************************************************

		/// <summary>
		/// Gets the target namespace.
		/// </summary>
		public string TargetNamespace
		{
			get {return m_targetNamespace;}
		} // End TargetNamespace

		// ******************************************************************

		/// <summary>
		/// Gets the connection string for the assembly.
		/// </summary>
		public string ConnectionString
		{
			get {return m_connectionString;}
		} // End ConnectionString

		#endregion

		// ******************************************************************
		// Constructors.
		// ******************************************************************

		#region Constructors

		/// <summary>
		/// Creates a new instance of the DataSettings class.
		/// </summary>
		/// <param name="sectionName">The name of the section.</param>
		/// <param name="assembly">The name of the target .NET assembly.</param>
		/// <param name="assembly">The target namespace.</param>
		/// <param name="connectionString">The connection string for the database.</param>
		internal DataSettings(
			string sectionName,
			string targetAssembly,
			string targetNamespace,
			string connectionString
			)
		{

			m_sectionName = sectionName;
			m_targetAssembly = targetAssembly;
			m_targetNamespace = targetNamespace;
			m_connectionString = connectionString;

		} // End DataSettings()

		#endregion

	} // End class DataSettings

} // End namespace CG.Security.Data.Configuration

